<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'tab.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script src="js/date.js" type="text/javascript"></script>
<SCRIPT LANGUAGE="JavaScript" src="js/jquery.js"> </SCRIPT>
<SCRIPT src="js/color.js" type="text/javascript"></SCRIPT>
	
		<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	font-size: 12px;
	font-weight: bold;
}

.STYLE4 {
	color: #03515d;
	font-size: 12px;
}
-->
.boxBorder {
	border: 1px solid green;
}


#addlink {
	position: absolute;
	width: 400px;
	left: 50%;
	top: 50%;
	margin-left: -200px;
	height: auto;
	z-index: 100;
	background-color: #fff;
	border: 1px #8FA4F5 solid;
	padding: 1px;
}

#addlink h2 {
	height: 25px;
	font-size: 14px;
	background-color:#7bc4d3;
	position: relative;
	padding-left: 10px;
	line-height: 25px;
	color: white;
}

#addlink h2 a {
	position: absolute;
	right: 5px;
	font-size: 12px;
	color: white;
}

#addlink .form {
	padding-left: 10px;
}
#BgDiv {
	background-color: #e3e3e3;
	position: absolute;
	z-index: 99;
	left: 0;
	top: 0;
	display: none;
	width: 100%;
	height: 1000px;
	opacity: 0.5;
	filter: alpha(opacity = 50);
	-moz-opacity: 0.5;
}
#addlinks {
	position: absolute;
	width: 400px;
	left: 50%;
	top: 50%;
	margin-left: -200px;
	height: auto;
	z-index: 100;
	background-color: #fff;
	border: 1px #8FA4F5 solid;
	padding: 1px;
}

#addlinks h2 {
	height: 25px;
	font-size: 14px;
	background-color:#7bc4d3;
	position: relative;
	padding-left: 10px;
	line-height: 25px;
	color: white;
}

#addlinks h2 a {
	position: absolute;
	right: 5px;
	font-size: 12px;
	color: white;
}

#addlinks .form {
	padding-left: 10px;
}
#addBgDiv {
	background-color: #e3e3e3;
	position: absolute;
	z-index: 99;
	left: 0;
	top: 0;
	display: none;
	width: 100%;
	height: 1000px;
	opacity: 0.5;
	filter: alpha(opacity = 50);
	-moz-opacity: 0.5;
}
</style>
<SCRIPT src="js/jquery.js" type="text/javascript"></SCRIPT>
<script type="text/javascript">
	function del(ghId){
	 if(confirm("确定要删除吗？")){
	 	location="guahao.do?method=getAllGh&ghId="+ghId;
	 }
	}
	function closeMe(){
			BgDiv.style.display="none";
	 		$("#edit").css("display","none");
		}
		function showI(){
			addlinks.style.display="block";
			addlinks.style.top="100px";
			addlinks.style.left="400px";
			addBgDiv.style.display="block";
			$("#addedit").css("display","block");
		}
		function showme(ghid,a,b,c,d,e,f,g,h){
			addlink.style.display="block";
			addlink.style.top="100px";
			addlink.style.left="400px";
			BgDiv.style.display="block";
     		//BgDiv.style.height="document.height()";
			$("#edit").css("display","block");
			$("#ghId").val(ghid);
	 		$("#a").val(a);
	 		$("#b").val(b);
	 		if(c == "男"){
	 			$("#c").attr("checked","checked");
	 		} else {
	 			$("#cc").attr("checked","checked");
	 		}
	 		$("#d").val(d);
	 		$("#e").val(e);
	 		$("#f").val(f);
	 		$("#g").val(g);
	 		$("#h").val(h);
		}
</script>
	
	</head>
	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="30" background="backstage/tab/images//tab_05.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="30">
								<img src="backstage/tab/images//tab_03.gif" width="12" height="30" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="46%" valign="middle">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="5%">
														<div align="center">
															<img src="backstage/tab/images//tb.gif" width="16" height="16" />
														</div>
													</td>
													<td width="95%" class="STYLE1">
														<span class="STYLE3">你当前的位置</span>：[业务中心]-[用户挂号]
													</td>
												</tr>
											</table>
										</td>
										<td width="54%">
											<table border="0" align="right" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="60">
														<table width="87%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
															</tr>
														</table>
													</td>
													<td width="60">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
															</tr>
														</table>
													</td>
													<td width="60">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
															</tr>
														</table>
													</td>
													<td width="52">
														<table width="88%" border="0" cellpadding="0"
															cellspacing="0">
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="backstage/tab/images//tab_07.gif" width="16" height="30" />
							</td>
						</tr>
						
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="8" background="backstage/tab/images//tab_12.gif">
								&nbsp;
							</td>
							<td>
							<c:if test="${message != null}">
								<table width="100%">
									<tr style="background-color: #87CEFF">
										<td align="center" valign="center" height="30">
											<div>${message}</div>
										</td>
									</tr>
								</table>
							</c:if>
								<table width="100%" border="0" cellpadding="0" cellspacing="1"
									bgcolor="b5d6e6">
									<tr>
										<td width="12%" height="22" background="backstage/tab/images//bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">证件名称</span>
											</div>
										</td>
										<td width="12%" height="22" background="backstage/tab/images//bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">证件号</span>
											</div>
										</td>
										<td width="14%" background="backstage/tab/images//bg.gif" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">就诊人名字</span>
											</div>
										</td>
										<td width="18%" height="22" background="backstage/tab/images//bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">就诊人电话</span>
											</div>
										</td>
										<td width="14%" height="22" background="backstage/tab/images//bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">预约时间</span>
											</div>
										</td>
										<td width="14%" height="22" background="backstage/tab/images//bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">预约医生</span>
											</div>
										</td>
										<td width="15%" height="22" background="backstage/tab/images//bg.gif"
											bgcolor="#FFFFFF" class="STYLE1">
											<div align="center">
												基本操作
											</div>
										</td>
									</tr>
									<c:forEach items="${ghList}" var="gh">
									<tr>
										<td height="20" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">${gh.zjname }</span>
											</div>
										</td>
										<td height="20" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">${gh.zjnumber } </span>
											</div>
										</td>
										<td bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">${gh.jzname }</span>
											</div>
										</td>
										<td height="20" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">${gh.jzphone }</span>
											</div>
										</td>
										<td height="20" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">${gh.jzTime }</span>
											</div>
										</td>
										<td height="20" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">${gh.gh_doc }</span>
											</div>
										</td>
										<td height="20" bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE4"><a onclick=showme(${gh.ghId },'${gh.zjnumber}','${gh.jzname }','${gh.sex }','${gh.jzsr}','${gh.jzemail }','${gh.jzphone }','${gh.gh_kb }','${gh.gh_doc }')>编辑</a>&nbsp; &nbsp;<a
														onclick="del(${gh.ghId })"/>删除</a></span>
											</div>
										</td>
									</tr>
									</c:forEach>
								</table>
							<td width="8" background="backstage/tab/backstage/tab/images///tab_15.gif">
								&nbsp;
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="35" background="backstage/tab/backstage/tab/images///tab_19.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="35">
								<img src="backstage/tab/images/tab_18.gif" width="12" height="35" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td class="STYLE4">
											&nbsp;&nbsp;共有 ${rowCount} 条记录，当前第 ${current}/${pageCount} 页
										</td>
										<td>
										<form action="guahao.do?method=getAllGh" method="post">
											<table border="0" align="right" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="40">
													<a href="guahao.do?method=getAllGh&current=1">
														<img src="backstage/tab/images/first.gif" width="37" height="15" border="0"/>
														</a>
													</td>
													<td width="45">
													<a href="guahao.do?method=getAllGh&current=${current-1}">
														<img src="backstage/tab/images/back.gif" width="43" height="15" border="0"/>
														</a>
													</td>
													<td width="45">
													<a href="guahao.do?method=getAllGh&current=${current+1}">
														<img src="backstage/tab/images/next.gif" width="43" height="15" border="0"/>
														</a>
													</td>
													<td width="40">
													<a href="guahao.do?method=getAllGh&current=${pageCount}">
														<img src="backstage/tab/images/last.gif" width="37" height="15" border="0"/>
														</a>
													</td>
													
													<td width="100">
														<div align="center">
															<span class="STYLE1">转到第 <input name="current"
																	type="text" size="4"
																	onkeypress="if ((event.keyCode<48 || event.keyCode>57)) {event.returnValue=false};
															if(this.value.length > 4){this.value = 10000}"
																	style="height: 12px; width: 20px; border: 1px solid #999999;" />
																页 </span>
														</div>
													</td>
													<td width="40">
														<img src="backstage/tab/images/go.gif" width="37" height="15" onclick="submit()"/>
													</td>
												</tr>
											</table>
											</form>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="backstage/tab/images/tab_20.gif" width="16" height="35" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<div id="BgDiv"></div>
				<div  id="edit" style="display:none">
    <div id="addlink" style="width:431px;height:100px;margin:0px auto 0px;padding:1px;border:1px solid #a5b6c8;background-color:#eef3f7;">
    <h2 id="bianji">
						用户挂号信息编辑
				<a href="javascript: closeMe( )">关闭</a>
			</h2>
		<div class="form" style="margin-top: -55px; margin-left: -10px">
				<FORM METHOD=post ACTION="guahao.do?method=updateGh">
									<input type="hidden" id="ghId" name="ghId"/>
										<table>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													证件名称
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=18  type=text name=zjname  readonly="readonly" value="身份证" />
													</TD>												
												<br />
												<br />											
											</TR>

											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													证件号码
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=19 maxlength="18" type=text name=zjnumber id="a" />
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													就诊人姓名
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=19 type=text name=jzname id="b"/>
												</TD>
											</TR>

											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													性 别
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<input type="radio" name="sex" value="男"  id="c" />
													男
													<input type="radio" name="sex" value="女" id="cc" />
													女
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													出生日期
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  size=18 type=text name=jzsr id="d" onfocus=HS_setDate(this) readonly="readonly"/>
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													电子邮件
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=18 type=text name=jzemail id="e"/>
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=47 vAlign=center
													width=120 align=right>
													联系电话
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=47 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT 	class=jyts_bk2	size=18 type=text name=jzphone id="f"/>														<div id="dhhaoma" style="color: red; display: inline" />
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=47 vAlign=center
													width=120 align=right>
													挂号科别
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=47 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT 	size=18 type=text name=gh_kb id="g"/>
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=47 vAlign=center
													width=120 align=right>
													挂号医生
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=47 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT 	size=18 type=text name=gh_doc id="h" />
												</TD>
											</TR>
										</TABLE>
								<center>
									<INPUT TYPE="submit" value="提&nbsp;交">
								</center>
				</FORM>
    </div>
    </div>
    </div>
    <div id="addBgDiv"></div>
				<div  id="addedit" style="display:none">
    <div id="addlinks" style="width:431px;height:100px;margin:0px auto 0px;padding:1px;border:1px solid #a5b6c8;background-color:#eef3f7;">
    <h2 id="bianji">
						用户挂号信息编辑
				<a href="javascript: closeMe( )">关闭</a>
			</h2>
		<div class="form" style="margin-top: -55px; margin-left: -10px">
				<FORM METHOD=post ACTION="guahao.do?method=yuliuGuahao&add=insert">
										<table>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													证件名称
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=18  type=text name=zjname  readonly="readonly" value="身份证" />
													</TD>												
												<br />
												<br />											
											</TR>

											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													证件号码
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=19 maxlength="18" type=text name=zjnumber id="a" />
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													就诊人姓名
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=19 type=text name=jzname id="b"/>
												</TD>
											</TR>

											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													性 别
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<input type="radio" name="sex" value="男"  id="c" />
													男
													<input type="radio" name="sex" value="女" id="cc" />
													女
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													出生日期
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  size=18 type=text name=jzsr id="d" onfocus=HS_setDate(this) readonly="readonly"/>
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=33 vAlign=center
													width=120 align=right>
													电子邮件
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=33 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT  class=jyts_bk2 size=18 type=text name=jzemail/>
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=47 vAlign=center
													width=120 align=right>
													联系电话
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=47 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT 	class=jyts_bk2	size=18 type=text name=jzphone/>														<div id="dhhaoma" style="color: red; display: inline" />
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=47 vAlign=center
													width=120 align=right>
													挂号科别
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=47 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT 	size=18 type=text name=gh_kb/>
												</TD>
											</TR>
											<TR>
												<TD class=jj_r_5 bgColor=#eefbfe height=47 vAlign=center
													width=120 align=right>
													挂号医生
												</TD>
												<TD class=jj_l_5 bgColor=#eefbfe height=47 vAlign=center
													width=341 colSpan=2 align=left>
													<INPUT 	size=18 type=text name=gh_doc />
												</TD>
											</TR>
											<tr>
												<td colspan="4" class=jj_l_5 bgColor=#eefbfe width=341>
													<li>
														<span class="span1"><span>*</span>就诊人是否有该医院的就诊卡(ID号或医院条形码)：</span>
														<br />
														<span
															class="span2"> <input type="radio"
																name="selRad" id="selRad1" value="1"
																class="input_clear" onclick="setMedical(1)" />																
															<label for="selRad1">
																有
															</label> <input type="radio" name="selRad" id="selRad2"
																value="2" class="input_clear" checked
																onclick="setMedical(2)" /> <label
																for="selRad2">
																无
															</label>
															<br />
															<div style="display: none" id="tttt">	
																														
																<span class="span1"><span>*</span>就诊卡(ID号或医院条形码)：</span>
																<span class="span2"><input type="text"																	
																		name="regBean.userHospCard" size="40" maxlength="15"
																		value="" id="userHospCard" onblur="checkMedical();"
																		onkeypress="return checkInValue(event)" /><span
																	id="msg"></span> </span>
																	<br />
																<font color="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;请正确填写就诊卡(ID号)，如果卡号有字母+数字，需要全部填写。如果填错，医院将不保留预约号源。</font>
															</div>

															<li>
																<span class="span1"><span>*</span>如果预约的医生临时停诊，您的选择是：</span><span
																	class="span2"><input type="radio" id="userSel1"
																		value="1" name="userSel" class="input_clear" checked="checked" />同意换医生，由系统自动更换该科室当日其他医生。<br />
																	<input type="radio" id="userSel2" value="2"
																		name="regBean.userSel" class="input_clear" />同意换日期，由客服查询更换“可预约时间范围内”的其它号源。</span>
																
																
															</li>
												</span></td>
											</tr>
											<tr>
												<td align="center" colspan="5"><input type="submit" value="马上预约"/>
												</td>
											</tr>
										</TABLE>
				</FORM>
    </div>
    </div>
    </div>
		
	</body>
</html>
